<template>
	<view v-if="show" :class="['empty u-flex-center',mode]" :style="{paddingTop:top,paddingBottom:bottom}">
		<view class="empty-text" :style="{fontSize:fontSize}">{{text}}</view>
	</view>
</template>
<script>
	export default {
		name: "empty",
		data() {
			return {};
		},
		// 此处定义传入的参数
		props: {
			show: {
				type: Boolean,
				default: true,
			},
			mode: {
				type: String,
				default: 'full-screen',
			},
			text: {
				type: String,
				default: '暂无数据~',
			},
			bottom: {
				type: String,
				default: '20rpx',
			},
			top: {
				type: String,
				default: '20rpx',
			},
			fontSize: {
				type: String,
				default: '28rpx',
			},
		},
		watch: {},
		mounted() {},
		methods: {},
	}
</script>
<style lang="scss">
	.empty {
		text-align: center;
		color: #abaeb5;
	}

	.full-screen {
		height: 60vh;
	}
</style>